/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.crop.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * js_cropEntity
 * @author 达芬奇
 * @version 2019-10-05
 */
@Table(name="${_prefix}crop", alias="a", columns={
		@Column(name="id", attrName="id", label="农作物编号", isPK=true),
		@Column(name="name", attrName="name", label="农作物名", queryType=QueryType.LIKE),
		@Column(name="needtime", attrName="needtime", label="成熟需要的时间", comment="成熟需要的时间(月）"),
	}, orderBy="a.id DESC"
)
public class Crop extends DataEntity<Crop> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 农作物名
	private String needtime;		// 成熟需要的时间(月）
	
	public Crop() {
		this(null);
	}

	public Crop(String id){
		super(id);
	}
	
	@Length(min=0, max=255, message="农作物名长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="成熟需要的时间长度不能超过 20 个字符")
	public String getNeedtime() {
		return needtime;
	}

	public void setNeedtime(String needtime) {
		this.needtime = needtime;
	}
	
}